<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

class Register_model extends MY_Model{

    function Register_model()
    {
        parent::My_Model();
    }
    function get_package_offers($type=NULL)
    {
        if($type)
            $this->db->where('package_type', $type);
        $query = $this->db->get('package_offers');
        return $query->result();

    }
     function get_package_offers_byId($id)
    {
        $this->db->where('id', $id);
        $query = $this->db->get('package_offers');
        return $query->row_array();

    }
    function check_package_offers_special($type=NULL)
    {
        if($type)
            $this->db->where('package_type', $type);
        $this->db->where('special', '1');
        $query = $this->db->get('package_offers');
        if($query->num_rows()>0)
        return TRUE;
        else
        return FALSE;

    }
}


?>
